<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        body{
            background-image: url('./img.png');
            background-position: center;
            background-repeat: no-repeat;
            background-size: cover;
            height: 100vh;
        }
        .modal{
            // 蒙层
            background: rgba(0,0,0,0.7);
            height: 100%;
            width: 100%;
        }
        .modal h1{
            width: 100%;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 12vw;

            /* 文字描边 safari 浏览器不支持 需要使用-webkit-text-stroke */
            text-stroke: 3px red;
            -webkit-text-stroke: 3px red;
            background-clip: text;
            color: transparent;
            background-image: url('./img.png');
            background-position: center;
            background-repeat: no-repeat;
            background-size: cover;
        }
    </style>
</head>
<body>
        <div class="modal">
            <h1>asdasd</h1>
        </div>
</body>
</html>